import { useRoutes } from 'react-router-dom';
import Login from '@/pages/user/Login';
import Dashboard from '@/components/dashboard/Index';
import ReactHookDemo from '@/pages/hooks/Index'
import CssLayoutDemo from '@/pages/css/LayoutDemo';

const routes = [
    {
        path: '/',
        redirect: '/react-hooks',
    },
    {
        path: '/react-hooks',
        element: <Dashboard>
            <ReactHookDemo />
        </Dashboard>,
    },
    {
        path: '/css-layout',
        element: <Dashboard>
            <CssLayoutDemo />
        </Dashboard>,
    },
    {
        path: '/user',
        element: <Dashboard>
            <div>user</div>
        </Dashboard>,
    },
]
const RouterRender = () => {
    const element = useRoutes(routes)
    return element
}
export default RouterRender;